function scroll() {
    var header = document.querySelector('#header');
    var menu = document.querySelector('#main_menu');
    var top = $("#main").offset().top;
    var scrollTop = $(window).scrollTop();
    if (scrollTop > top) {
        header.style.backgroundColor = 'rgba(10,10,10,0.1)';
        menu.style.backgroundColor = 'rgba(10,10,10,0)';
    } else {
        header.style.backgroundColor = 'transparent';
        menu.style.backgroundColor = 'transparent';
    }
}
$(window).on('scroll', function() {
    scroll()
});

let v = new Vue({
    el: '#app',
    data: function() {
        return {
            activeIndex:'1',
            activeIndex1:'1',
        }
    },
    methods:{
        handleSelect(key,keyPath){
            //key就是导航菜单项的index的值
            if (key=='1'){
                location.href="123.html";
            }else if(key=='2'){
                location.href="123.html";
            }else if(key=='3'){
                location.href="123.html";
            }else if(key=='4'){
                location.href="123.html";
            }else if(key=='5'){
                location.href="123.html";
            }else{
                location.href="123.html";
            }
        },



    }
})